package com.drojian.demo2.root_fragment;

import android.content.Intent;
import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.drojian.demo.R;
import com.drojian.demo2.cartoon.AttributeCartoonActivity;
import com.drojian.demo2.cartoon.FrameCartoonActivity;
import com.drojian.demo2.cartoon.InterstitialCartoonActivity;
import com.drojian.demo2.cartoon.LottieCartoonActivity;


public class CartoonFragment extends Fragment {



    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.part2_fragment_cartoon, container, false);
        Button frame_cartoon = view.findViewById(R.id.frame_cartoon);
        Button Interstitial_cartoon = view.findViewById(R.id.Interstitial_cartoon);
        Button attribute_cartoon = view.findViewById(R.id.attribute_cartoon);
        Button lottie_cartoon = view.findViewById(R.id.lottie_cartoon);
        frame_cartoon.setOnClickListener(v->startActivity(
                new Intent(getContext(), FrameCartoonActivity.class)));
        Interstitial_cartoon.setOnClickListener(v->startActivity(
                new Intent(getContext(), InterstitialCartoonActivity.class)));
        attribute_cartoon.setOnClickListener(v->startActivity(
                new Intent(getContext(), AttributeCartoonActivity.class)));
        lottie_cartoon.setOnClickListener(v->startActivity(
                new Intent(getContext(), LottieCartoonActivity.class)));

        return view;
    }
    public static CartoonFragment newInstance() {
        return new CartoonFragment();
    }
}